/**
 * Copyright ©2012-2018 HopeHaiyang Corporation, All Rights Reserved
 * http://www.wuhanhope.com
 */
package hujia.core;

import org.aspectj.lang.annotation.After;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.aspectj.lang.annotation.Pointcut;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * class info
 *
 * @author hujia
 *         Create at 2018/6/13 16:04
 */
@Aspect
public class TimeHandler {

    private static final Logger logger = LoggerFactory.getLogger(TimeHandler.class);


    @Pointcut("execution(* hujia.core.HujiaTest.test(..))")
    private void aspectJMethod(){}


    @Before("aspectJMethod()")
    public void printBeforeTime() {
        logger.debug("CurrentTime = " + System.currentTimeMillis());
    }

    @After("aspectJMethod()")
    public void printTime() {
        logger.debug("CurrentTime = " + System.currentTimeMillis());
    }



}
